package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_cwa_tem database table.
 * 
 */
@Entity
@Table(name="per_cwa_tem")
@NamedQuery(name="PerCwaTem.findAll", query="SELECT p FROM PerCwaTem p")
public class PerCwaTem implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int temid;

	private String temname;

	private String temrem;

	private int temrs;

	//bi-directional many-to-one association to PerCwaCwas
	@OneToMany(mappedBy="perCwaTem")
	private List<PerCwaCwas> perCwaCwas;

	//bi-directional many-to-one association to PerPmsDept
	@ManyToOne
	@JoinColumn(name="DEPTID")
	private PerPmsDept perPmsDept;

	//bi-directional many-to-one association to PerPmsEmp
	@ManyToOne
	@JoinColumn(name="EMPID")
	private PerPmsEmp perPmsEmp;

	public PerCwaTem() {
	}

	public int getTemid() {
		return this.temid;
	}

	public void setTemid(int temid) {
		this.temid = temid;
	}

	public String getTemname() {
		return this.temname;
	}

	public void setTemname(String temname) {
		this.temname = temname;
	}

	public String getTemrem() {
		return this.temrem;
	}

	public void setTemrem(String temrem) {
		this.temrem = temrem;
	}

	public int getTemrs() {
		return this.temrs;
	}

	public void setTemrs(int temrs) {
		this.temrs = temrs;
	}

	public List<PerCwaCwas> getPerCwaCwas() {
		return this.perCwaCwas;
	}

	public void setPerCwaCwas(List<PerCwaCwas> perCwaCwas) {
		this.perCwaCwas = perCwaCwas;
	}

	public PerCwaCwas addPerCwaCwa(PerCwaCwas perCwaCwa) {
		getPerCwaCwas().add(perCwaCwa);
		perCwaCwa.setPerCwaTem(this);

		return perCwaCwa;
	}

	public PerCwaCwas removePerCwaCwa(PerCwaCwas perCwaCwa) {
		getPerCwaCwas().remove(perCwaCwa);
		perCwaCwa.setPerCwaTem(null);

		return perCwaCwa;
	}

	public PerPmsDept getPerPmsDept() {
		return this.perPmsDept;
	}

	public void setPerPmsDept(PerPmsDept perPmsDept) {
		this.perPmsDept = perPmsDept;
	}

	public PerPmsEmp getPerPmsEmp() {
		return this.perPmsEmp;
	}

	public void setPerPmsEmp(PerPmsEmp perPmsEmp) {
		this.perPmsEmp = perPmsEmp;
	}

}